package com.punch.common.vo.course;

import com.fasterxml.jackson.annotation.JsonFormat;
import com.fasterxml.jackson.annotation.JsonInclude;
import com.fasterxml.jackson.databind.annotation.JsonSerialize;
import com.fasterxml.jackson.databind.ser.std.ToStringSerializer;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;

import java.io.Serializable;
import java.time.LocalDate;
import java.time.LocalDateTime;

/**
 * CoursesForAppVO-家长端可选课程列表 展示vo
 *
 * @author xiaol
 * @version 1.0.0
 * @since 2020/7/21
 */
@Data
public class AppClassVO implements Serializable {

    @ApiModelProperty(name = "classId", notes = "班级id")
    @JsonSerialize(using = ToStringSerializer.class)
    private Long classId;

    /**
     * 班级名称
     */
    @ApiModelProperty(name = "className", notes = "班级名称")
    @JsonSerialize(using = ToStringSerializer.class)
    private String className;

    @ApiModelProperty(name = "courseId", notes = "课程ID")
    @JsonSerialize(using = ToStringSerializer.class)
    private Long courseId;

    @ApiModelProperty(name = "courseName", notes = "课程名称")
    private String courseName;


    @ApiModelProperty(name = "courseCreateId", notes = "课程创建者id")
    @JsonSerialize(using = ToStringSerializer.class)
    @JsonInclude(JsonInclude.Include.NON_NULL)
    private Long courseCreateId;

    @ApiModelProperty(name = "classState", notes = "班级状态：0待报名 1报名中 2已开班 3取消报名 4已完成")
    private Integer classState;

    @ApiModelProperty(name = "statusName", notes = "状态名称")
    private String statusName;

    @ApiModelProperty(name = "classStatus", notes = "状态")
    private Integer classStatus;

    @ApiModelProperty(name = "signUpEndTime", notes = "报名截止时间")
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
    private LocalDateTime signUpEndTime;


    @ApiModelProperty(name = "courseTime", notes = "上课时间")
    private String courseTime;

    @ApiModelProperty(name = "classOpenDate", notes = "开班日期")
    @JsonFormat(pattern = "yyyy-MM-dd", timezone = "GMT+8")
    private LocalDate classOpenDate;


    @ApiModelProperty(name = "teacherName", notes = "教师名称")
    private String teacherName;


    @ApiModelProperty(name = "teacherName", notes = "教师名称")
    private String classRoomName;


    /**
     * 课程分类名称  单选 (素质课、社团课、托管班...)
     */
    @ApiModelProperty(name = "courseClassify", notes = "课程分类名称  单选 (0-素质课、1-社团课、2-托管班...)")
    private String courseClassify;


    /**
     * 课程类目名称
     */
    @ApiModelProperty(name = "courseCategoryName", notes = "课程类目名称")
    private String courseCategoryName;

    /**
     * 课程适用年级名称  1-6年级多选
     */
    @ApiModelProperty(name = "courseGrade", notes = "课程适用年级名称  1-6年级多选")
    private String courseGrade;

    /**
     * 课程适用年级名称  1-6年级多选
     */
    @ApiModelProperty(name = "courseGrade", notes = "课程适用年级名称  1-6年级多选")
    private String courseGradeName;

    /**
     * 级别对应的名称
     */
    @ApiModelProperty(name = "courseLevel", notes = "级别对应的名称")
    private String courseLevel;


    @ApiModelProperty(name = "containMaterialFlag", notes = "是否包含教材/教具：勾选框，默认否  0否  1是")
    private Integer containMaterialFlag;

    /**
     * 课程介绍
     */
    @ApiModelProperty(name = "courseIntroduce", notes = "课程介绍")
    private String courseIntroduce;

    /**
     * 课时数
     */
    @ApiModelProperty(name = "courseHourCount", notes = "课时数")
    private Integer courseHourCount;
    /**
     * 课时单价：单位分
     */
    @ApiModelProperty(name = "courseHourAmount", notes = "课时单价：单位分")
    private Integer courseHourPrice;


    @ApiModelProperty(name = "courseMaterialPrice", notes = "教材/教具价钱")
    private Integer courseMaterialPrice;

    @ApiModelProperty(name = "courseMaterialName", notes = "教具名称")
    private String courseMaterialName;


    @ApiModelProperty(name = "requireBuyFlag", notes = "是否必须购买")
    private Integer requireBuyFlag;

    @ApiModelProperty(name = "numberFullFlag", notes = "报名人数是否达到最大人数")
    private boolean numberFullFlag;

    /**
     * 供应商id,只有包含教具的时候才需要指定供应商
     */
    @JsonSerialize(using = ToStringSerializer.class)
    @JsonInclude(JsonInclude.Include.NON_NULL)
    private Long supplierId;

    /**
     * 供应商名称,只有包含教具的时候才需要指定供应商
     */
    @JsonInclude(JsonInclude.Include.NON_NULL)
    private String supplierName;

    /**
     * 机构id
     */
    @JsonInclude(JsonInclude.Include.NON_NULL)
    private Long organId;

    /**
     * 课程创建者姓名
     */
    @JsonInclude(JsonInclude.Include.NON_NULL)
    private String courseCreateName;

    /**
     * 已报名人数
     */
    @ApiModelProperty(name = "signUpNumber", notes = "已报名人数")
    private Integer signUpNumber;

    /**
     * 最大人数
     */
    @ApiModelProperty(name = "stuNoMax", notes = "最大人数")
    private Integer stuNoMax;

    private String courseWeek;

    private String classTime;
}
